{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-08-25T09:11:29.119513Z",
     "iopub.status.busy": "2023-08-25T09:11:29.118490Z",
     "iopub.status.idle": "2023-08-25T09:12:42.773907Z",
     "shell.execute_reply": "2023-08-25T09:12:42.772665Z",
     "shell.execute_reply.started": "2023-08-25T09:11:29.119483Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://mirror.baidu.com/pypi/simple/, https://mirrors.aliyun.com/pypi/simple/, https://pypi.tuna.tsinghua.edu.cn/simple/\r\n",
      "Collecting paddleocr>=2.6.0.3\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/30/ba/4bbe3fa30019f70bc864374e957cb4b03844c5c5f0e36b591b439a45b5cb/paddleocr-2.7.0.2-py3-none-any.whl (466 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m466.1/466.1 kB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting shapely (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/a8/a5/403728b5614b28083f6424dfdefec5fcf58068495fb03bb08532671c642f/shapely-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.3/2.3 MB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting scikit-image (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/70/a9/a9f63dde69ac5a4451d8a0ebdde95824ec31aafcae1c77658a9058e27bb7/scikit_image-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.8 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.8/13.8 MB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting imgaug (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/66/b1/af3142c4a85cba6da9f4ebb5ff4e21e2616309552caca5e8acefe9840622/imgaug-0.4.0-py2.py3-none-any.whl (948 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m948.0/948.0 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting pyclipper (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/f1/d8/20d6d4ad897a63f993d5e60f64e3df46ed0cb872cb3a75b6a42432226d89/pyclipper-1.3.0.post4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (813 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m813.9/813.9 kB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting lmdb (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/83/67/8f32a70336d3ff1149cbd31e5a877997384f78c3940edc0abff95c8a5601/lmdb-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (299 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m299.2/299.2 kB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hRequirement already satisfied: tqdm in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from paddleocr>=2.6.0.3) (4.65.0)\r\n",
      "Requirement already satisfied: numpy in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from paddleocr>=2.6.0.3) (1.25.1)\r\n",
      "Requirement already satisfied: visualdl in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from paddleocr>=2.6.0.3) (2.4.2)\r\n",
      "Collecting rapidfuzz (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/35/04/9ca97b17da457ed294519477da2aad0799c9ba8eebf37761a5ca94c35534/rapidfuzz-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m4.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting opencv-python<=4.6.0.66 (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/af/bf/8d189a5c43460f6b5c8eb81ead8732e94b9f73ef8d9abba9e8f5a61a6531/opencv_python-4.6.0.66-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.9 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.9/60.9 MB\u001b[0m \u001b[31m3.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting opencv-contrib-python<=4.6.0.66 (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/34/45/c8bc145b1541d1fbbf25d5494cd76453d9855971cfe571b9ad7e13cdb4c8/opencv_contrib_python-4.6.0.66-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67.1 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.1/67.1 MB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting cython (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/6f/8c/68139f464aeee699b04ec401b9de0d7e05fdd3a123c4c13429b887e16c8f/Cython-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.6/3.6 MB\u001b[0m \u001b[31m4.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting lxml (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/3c/d2/11533f0bc47ff4d828a20cfb702f3453fe714bd5b475fcdc8cec6e6b7dcf/lxml-4.9.3-cp310-cp310-manylinux_2_28_x86_64.whl (7.9 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.9/7.9 MB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting premailer (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/b1/07/4e8d94f94c7d41ca5ddf8a9695ad87b888104e2fd41a35546c1dc9ca74ac/premailer-3.10.0-py2.py3-none-any.whl (19 kB)\r\n",
      "Collecting openpyxl (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/6a/94/a59521de836ef0da54aaf50da6c4da8fb4072fb3053fa71f052fd9399e7a/openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m250.0/250.0 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting attrdict (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/ef/97/28fe7e68bc7adfce67d4339756e85e9fcf3c6fd7f0c0781695352b70472c/attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB)\r\n",
      "Collecting PyMuPDF<1.21.0 (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/57/a7/e3f2ee590766aa8c923b9580ee7dc9e2c5cec3b1f00456e66ec8a47192d0/PyMuPDF-1.20.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.9 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m8.9/8.9 MB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hRequirement already satisfied: Pillow in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from paddleocr>=2.6.0.3) (10.0.0)\r\n",
      "Collecting python-docx (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/8b/a0/52729ce4aa026f31b74cc877be1d11e4ddeaa361dc7aebec148171644b33/python-docx-0.8.11.tar.gz (5.6 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.6/5.6 MB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\r\n",
      "\u001b[?25hCollecting beautifulsoup4 (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/57/f4/a69c20ee4f660081a7dedb1ac57f29be9378e04edfcb90c526b923d4bebc/beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m143.0/143.0 kB\u001b[0m \u001b[31m1.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\r\n",
      "\u001b[?25hRequirement already satisfied: fonttools>=4.24.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from paddleocr>=2.6.0.3) (4.41.0)\r\n",
      "Collecting fire>=0.3.0 (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/94/ed/3b9a10605163f48517931083aee8364d4d6d3bb1aa9b75eb0a4a5e9fbfc1/fire-0.5.0.tar.gz (88 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m88.3/88.3 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\r\n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\r\n",
      "\u001b[?25hCollecting pdf2docx (from paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/a2/58/fbb61776641b2aae1d408d1ee712e026040ae62b949857348504dde4cecb/pdf2docx-0.5.6-py3-none-any.whl (148 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m148.4/148.4 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\r\n",
      "\u001b[?25hRequirement already satisfied: six in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from fire>=0.3.0->paddleocr>=2.6.0.3) (1.16.0)\r\n",
      "Collecting termcolor (from fire>=0.3.0->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/67/e1/434566ffce04448192369c1a282931cf4ae593e91907558eaecd2e9f2801/termcolor-2.3.0-py3-none-any.whl (6.9 kB)\r\n",
      "Collecting soupsieve>1.2 (from beautifulsoup4->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/49/37/673d6490efc51ec46d198c75903d99de59baffdd47aea3d071b80a9e4e89/soupsieve-2.4.1-py3-none-any.whl (36 kB)\r\n",
      "Requirement already satisfied: scipy in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from imgaug->paddleocr>=2.6.0.3) (1.11.1)\r\n",
      "Requirement already satisfied: matplotlib in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from imgaug->paddleocr>=2.6.0.3) (3.7.2)\r\n",
      "Collecting imageio (from imgaug->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/c7/b0/7b6c35b8636ed773325cdb6f5ac3cd36afba63d99e20ed59c521cf5018b4/imageio-2.31.1-py3-none-any.whl (313 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m313.2/313.2 kB\u001b[0m \u001b[31m3.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting networkx>=2.8 (from scikit-image->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/a8/05/9d4f9b78ead6b2661d6e8ea772e111fc4a9fbd866ad0c81906c11206b55e/networkx-3.1-py3-none-any.whl (2.1 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting tifffile>=2022.8.12 (from scikit-image->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/74/68/19989a1009f68ed777ea5d2624c2996bab0890a31ce7d4b2a7ae4e1c0cfe/tifffile-2023.8.12-py3-none-any.whl (220 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m221.0/221.0 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\r\n",
      "\u001b[?25hCollecting PyWavelets>=1.1.1 (from scikit-image->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/3e/fc/651024e8b6e69bef6def2cbe27d520309f4ffc56b8d4885ab7046e1edc6c/PyWavelets-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.8/6.8 MB\u001b[0m \u001b[31m3.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\r\n",
      "\u001b[?25hRequirement already satisfied: packaging>=21 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from scikit-image->paddleocr>=2.6.0.3) (23.1)\r\n",
      "Collecting lazy_loader>=0.2 (from scikit-image->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/a1/c3/65b3814e155836acacf720e5be3b5757130346670ac454fee29d3eda1381/lazy_loader-0.3-py3-none-any.whl (9.1 kB)\r\n",
      "Collecting et-xmlfile (from openpyxl->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/96/c2/3dd434b0108730014f1b96fd286040dc3bcb70066346f7e01ec2ac95865f/et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)\r\n",
      "Collecting cssselect (from premailer->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/06/a9/2da08717a6862c48f1d61ef957a7bba171e7eefa6c0aa0ceb96a140c2a6b/cssselect-1.2.0-py2.py3-none-any.whl (18 kB)\r\n",
      "Collecting cssutils (from premailer->paddleocr>=2.6.0.3)\r\n",
      "  Downloading https://mirrors.aliyun.com/pypi/packages/7a/4a/acc05aba9edb75bf016d9f57928f0bea5a33de2079fd09ca61baec79a6f2/cssutils-2.7.1-py3-none-any.whl (399 kB)\r\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m399.7/399.7 kB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\r\n",
      "\u001b[?25hRequirement already satisfied: requests in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from premailer->paddleocr>=2.6.0.3) (2.31.0)\r\n",
      "Requirement already satisfied: cachetools in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from premailer->paddleocr>=2.6.0.3) (5.3.1)\r\n",
      "Requirement already satisfied: bce-python-sdk in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from visualdl->paddleocr>=2.6.0.3) (0.8.87)\r\n",
      "Requirement already satisfied: flask>=1.1.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from visualdl->paddleocr>=2.6.0.3) (2.3.2)\r\n",
      "Requirement already satisfied: Flask-Babel>=1.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from visualdl->paddleocr>=2.6.0.3) (2.0.0)\r\n",
      "Requirement already satisfied: protobuf>=3.11.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from visualdl->paddleocr>=2.6.0.3) (3.20.3)\r\n",
      "Requirement already satisfied: pandas in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from visualdl->paddleocr>=2.6.0.3) (2.0.3)\r\n",
      "Requirement already satisfied: multiprocess in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from visualdl->paddleocr>=2.6.0.3) (0.70.12.2)\r\n",
      "Requirement already satisfied: Werkzeug>=2.3.3 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from flask>=1.1.1->visualdl->paddleocr>=2.6.0.3) (2.3.6)\r\n",
      "Requirement already satisfied: Jinja2>=3.1.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from flask>=1.1.1->visualdl->paddleocr>=2.6.0.3) (3.1.2)\r\n",
      "Requirement already satisfied: itsdangerous>=2.1.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from flask>=1.1.1->visualdl->paddleocr>=2.6.0.3) (2.1.2)\r\n",
      "Requirement already satisfied: click>=8.1.3 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from flask>=1.1.1->visualdl->paddleocr>=2.6.0.3) (8.1.6)\r\n",
      "Requirement already satisfied: blinker>=1.6.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from flask>=1.1.1->visualdl->paddleocr>=2.6.0.3) (1.6.2)\r\n",
      "Requirement already satisfied: pytz in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from Flask-Babel>=1.0.0->visualdl->paddleocr>=2.6.0.3) (2023.3)\r\n",
      "Requirement already satisfied: Babel>=2.3 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from Flask-Babel>=1.0.0->visualdl->paddleocr>=2.6.0.3) (2.12.1)\r\n",
      "Requirement already satisfied: pycryptodome>=3.8.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from bce-python-sdk->visualdl->paddleocr>=2.6.0.3) (3.18.0)\r\n",
      "Requirement already satisfied: future>=0.6.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from bce-python-sdk->visualdl->paddleocr>=2.6.0.3) (0.18.3)\r\n",
      "Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from matplotlib->imgaug->paddleocr>=2.6.0.3) (1.1.0)\r\n",
      "Requirement already satisfied: cycler>=0.10 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from matplotlib->imgaug->paddleocr>=2.6.0.3) (0.11.0)\r\n",
      "Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from matplotlib->imgaug->paddleocr>=2.6.0.3) (1.4.4)\r\n",
      "Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from matplotlib->imgaug->paddleocr>=2.6.0.3) (3.0.9)\r\n",
      "Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from matplotlib->imgaug->paddleocr>=2.6.0.3) (2.8.2)\r\n",
      "Requirement already satisfied: dill>=0.3.4 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from multiprocess->visualdl->paddleocr>=2.6.0.3) (0.3.4)\r\n",
      "Requirement already satisfied: tzdata>=2022.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from pandas->visualdl->paddleocr>=2.6.0.3) (2023.3)\r\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from requests->premailer->paddleocr>=2.6.0.3) (3.2.0)\r\n",
      "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from requests->premailer->paddleocr>=2.6.0.3) (3.4)\r\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from requests->premailer->paddleocr>=2.6.0.3) (2.0.4)\r\n",
      "Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from requests->premailer->paddleocr>=2.6.0.3) (2023.5.7)\r\n",
      "Requirement already satisfied: MarkupSafe>=2.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages (from Jinja2>=3.1.2->flask>=1.1.1->visualdl->paddleocr>=2.6.0.3) (2.1.3)\r\n",
      "Building wheels for collected packages: fire, python-docx\r\n",
      "  Building wheel for fire (setup.py) ... \u001b[?25ldone\r\n",
      "\u001b[?25h  Created wheel for fire: filename=fire-0.5.0-py2.py3-none-any.whl size=116931 sha256=ec7887c6fe75e08d141216ffc55ffb10efa7d093cbbba72b02bd4e7321affb17\r\n",
      "  Stored in directory: /home/aistudio/.cache/pip/wheels/2f/78/ee/577babd37100ed82c1b43b75ae8a782e54023bfbd14a6592b3\r\n",
      "  Building wheel for python-docx (setup.py) ... \u001b[?25ldone\r\n",
      "\u001b[?25h  Created wheel for python-docx: filename=python_docx-0.8.11-py3-none-any.whl size=184490 sha256=f38f223c7de1afc2f62acb3118380606d6a6cf08936bcb233f51e537ddf9c626\r\n",
      "  Stored in directory: /home/aistudio/.cache/pip/wheels/fb/3a/3d/905fbf21788c25b02e7425d41ba0843850a01d888733410474\r\n",
      "Successfully built fire python-docx\r\n",
      "Installing collected packages: pyclipper, lmdb, tifffile, termcolor, soupsieve, shapely, rapidfuzz, PyWavelets, PyMuPDF, opencv-python, opencv-contrib-python, networkx, lxml, lazy_loader, imageio, et-xmlfile, cython, cssutils, cssselect, attrdict, scikit-image, python-docx, premailer, openpyxl, fire, beautifulsoup4, pdf2docx, imgaug, paddleocr\r\n",
      "  Attempting uninstall: opencv-python\r\n",
      "    Found existing installation: opencv-python 4.8.0.74\r\n",
      "    Uninstalling opencv-python-4.8.0.74:\r\n",
      "      Successfully uninstalled opencv-python-4.8.0.74\r\n",
      "Successfully installed PyMuPDF-1.20.2 PyWavelets-1.4.1 attrdict-2.0.1 beautifulsoup4-4.12.2 cssselect-1.2.0 cssutils-2.7.1 cython-3.0.0 et-xmlfile-1.1.0 fire-0.5.0 imageio-2.31.1 imgaug-0.4.0 lazy_loader-0.3 lmdb-1.4.1 lxml-4.9.3 networkx-3.1 opencv-contrib-python-4.6.0.66 opencv-python-4.6.0.66 openpyxl-3.1.2 paddleocr-2.7.0.2 pdf2docx-0.5.6 premailer-3.10.0 pyclipper-1.3.0.post4 python-docx-0.8.11 rapidfuzz-3.2.0 scikit-image-0.21.0 shapely-2.0.1 soupsieve-2.4.1 termcolor-2.3.0 tifffile-2023.8.12\r\n"
     ]
    }
   ],
   "source": [
    "!pip3 install \"paddleocr>=2.6.0.3\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-08-25T09:27:23.063881Z",
     "iopub.status.busy": "2023-08-25T09:27:23.063234Z",
     "iopub.status.idle": "2023-08-25T09:27:23.067736Z",
     "shell.execute_reply": "2023-08-25T09:27:23.067114Z",
     "shell.execute_reply.started": "2023-08-25T09:27:23.063852Z"
    },
    "scrolled": true,
    "tags": []
   },
   "outputs": [],
   "source": [
    "import glob\n",
    "import subprocess"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-08-25T09:32:54.930036Z",
     "iopub.status.busy": "2023-08-25T09:32:54.929412Z",
     "iopub.status.idle": "2023-08-25T10:01:05.238600Z",
     "shell.execute_reply": "2023-08-25T10:01:05.237861Z",
     "shell.execute_reply.started": "2023-08-25T09:32:54.930006Z"
    },
    "scrolled": true,
    "tags": []
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "libpng warning: iCCP: known incorrect sRGB profile\r\n",
      "libpng warning: iCCP: known incorrect sRGB profile\r\n",
      "libpng warning: iCCP: known incorrect sRGB profile\r\n",
      "libpng warning: iCCP: known incorrect sRGB profile\r\n",
      "libpng warning: iCCP: known incorrect sRGB profile\r\n"
     ]
    }
   ],
   "source": [
    "for path in glob.glob('/home/aistudio/图片文本块检测挑战赛公开数据/测试集A/images/*'):\n",
    "    path = path.replace('(', '\\(').replace(')', '\\)')\n",
    "    subprocess.check_output(\n",
    "        f\"paddleocr --image_dir={path} --type=structure --table=false --ocr=false\",\n",
    "        shell=True\n",
    "    )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-08-25T10:01:26.278872Z",
     "iopub.status.busy": "2023-08-25T10:01:26.278063Z",
     "iopub.status.idle": "2023-08-25T10:01:26.507287Z",
     "shell.execute_reply": "2023-08-25T10:01:26.506118Z",
     "shell.execute_reply.started": "2023-08-25T10:01:26.278843Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "!mkdir submit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-08-25T10:10:48.939659Z",
     "iopub.status.busy": "2023-08-25T10:10:48.939054Z",
     "iopub.status.idle": "2023-08-25T10:10:48.969110Z",
     "shell.execute_reply": "2023-08-25T10:10:48.968267Z",
     "shell.execute_reply.started": "2023-08-25T10:10:48.939628Z"
    },
    "scrolled": true,
    "tags": []
   },
   "outputs": [],
   "source": [
    "import json\n",
    "for path in glob.glob('/home/aistudio/图片文本块检测挑战赛公开数据/测试集A/images/*'):\n",
    "    tags = open('output/' + path.split('/')[-1][:-4] + '/res_0.txt').readlines()\n",
    "    tags = [json.loads(x)['bbox'] for x in tags]\n",
    "    with open('submit/' + path.split('/')[-1][:-4] + '.txt', 'w') as up:\n",
    "        for tag in tags:\n",
    "            up.write(\"blocks \" + ' '.join([str(x) for x in tag]) + ' 1.0\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-08-25T10:10:56.699196Z",
     "iopub.status.busy": "2023-08-25T10:10:56.698371Z",
     "iopub.status.idle": "2023-08-25T10:10:57.389613Z",
     "shell.execute_reply": "2023-08-25T10:10:57.388482Z",
     "shell.execute_reply.started": "2023-08-25T10:10:56.699161Z"
    },
    "scrolled": true,
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  adding: submit/ (stored 0%)\r\n",
      "  adding: submit/448.txt (deflated 15%)\r\n",
      "  adding: submit/179.txt (deflated 39%)\r\n",
      "  adding: submit/436.txt (deflated 13%)\r\n",
      "  adding: submit/150.txt (deflated 24%)\r\n",
      "  adding: submit/361.txt (deflated 14%)\r\n",
      "  adding: submit/395.txt (deflated 17%)\r\n",
      "  adding: submit/93.txt (stored 0%)\r\n",
      "  adding: submit/364.txt (deflated 27%)\r\n",
      "  adding: submit/77.txt (deflated 48%)\r\n",
      "  adding: submit/154.txt (deflated 12%)\r\n",
      "  adding: submit/329.txt (deflated 18%)\r\n",
      "  adding: submit/421.txt (deflated 33%)\r\n",
      "  adding: submit/55.txt (deflated 27%)\r\n",
      "  adding: submit/319.txt (deflated 15%)\r\n",
      "  adding: submit/330.txt (deflated 25%)\r\n",
      "  adding: submit/305.txt (stored 0%)\r\n",
      "  adding: submit/452.txt (stored 0%)\r\n",
      "  adding: submit/457(1).txt (deflated 13%)\r\n",
      "  adding: submit/368.txt (deflated 13%)\r\n",
      "  adding: submit/95.txt (deflated 4%)\r\n",
      "  adding: submit/149.txt (deflated 13%)\r\n",
      "  adding: submit/54.txt (deflated 14%)\r\n",
      "  adding: submit/450(1).txt (deflated 33%)\r\n",
      "  adding: submit/232.txt (deflated 36%)\r\n",
      "  adding: submit/455.txt (deflated 17%)\r\n",
      "  adding: submit/398.txt (deflated 17%)\r\n",
      "  adding: submit/334.txt (stored 0%)\r\n",
      "  adding: submit/47.txt (deflated 13%)\r\n",
      "  adding: submit/419.txt (stored 0%)\r\n",
      "  adding: submit/29.txt (deflated 20%)\r\n",
      "  adding: submit/217.txt (deflated 28%)\r\n",
      "  adding: submit/359.txt (stored 0%)\r\n",
      "  adding: submit/449(1).txt (deflated 34%)\r\n",
      "  adding: submit/145.txt (deflated 29%)\r\n",
      "  adding: submit/86.txt (deflated 47%)\r\n",
      "  adding: submit/188.txt (stored 0%)\r\n",
      "  adding: submit/459.txt (stored 0%)\r\n",
      "  adding: submit/223.txt (deflated 38%)\r\n",
      "  adding: submit/210.txt (deflated 35%)\r\n",
      "  adding: submit/153.txt (stored 0%)\r\n",
      "  adding: submit/297.txt (stored 0%)\r\n",
      "  adding: submit/253.txt (deflated 15%)\r\n",
      "  adding: submit/448(1).txt (deflated 13%)\r\n",
      "  adding: submit/73.txt (deflated 47%)\r\n",
      "  adding: submit/338.txt (stored 0%)\r\n",
      "  adding: submit/207.txt (deflated 36%)\r\n",
      "  adding: submit/435.txt (stored 0%)\r\n",
      "  adding: submit/67.txt (deflated 33%)\r\n",
      "  adding: submit/326.txt (deflated 25%)\r\n",
      "  adding: submit/410.txt (stored 0%)\r\n",
      "  adding: submit/42.txt (stored 0%)\r\n",
      "  adding: submit/212.txt (deflated 37%)\r\n",
      "  adding: submit/321.txt (stored 0%)\r\n",
      "  adding: submit/354.txt (deflated 14%)\r\n",
      "  adding: submit/239.txt (deflated 13%)\r\n",
      "  adding: submit/31.txt (stored 0%)\r\n",
      "  adding: submit/451.txt (deflated 35%)\r\n",
      "  adding: submit/408.txt (deflated 13%)\r\n",
      "  adding: submit/172.txt (stored 0%)\r\n",
      "  adding: submit/362.txt (deflated 39%)\r\n",
      "  adding: submit/411.txt (stored 0%)\r\n",
      "  adding: submit/418.txt (stored 0%)\r\n",
      "  adding: submit/231.txt (deflated 28%)\r\n",
      "  adding: submit/82.txt (stored 0%)\r\n",
      "  adding: submit/44.txt (stored 0%)\r\n",
      "  adding: submit/263.txt (deflated 54%)\r\n",
      "  adding: submit/467.txt (deflated 28%)\r\n",
      "  adding: submit/433.txt (deflated 32%)\r\n",
      "  adding: submit/187.txt (stored 0%)\r\n",
      "  adding: submit/275.txt (deflated 17%)\r\n",
      "  adding: submit/186.txt (deflated 32%)\r\n",
      "  adding: submit/216.txt (deflated 47%)\r\n",
      "  adding: submit/322.txt (stored 0%)\r\n",
      "  adding: submit/169.txt (deflated 36%)\r\n",
      "  adding: submit/340.txt (deflated 25%)\r\n",
      "  adding: submit/184.txt (stored 0%)\r\n",
      "  adding: submit/256.txt (deflated 19%)\r\n",
      "  adding: submit/320.txt (deflated 23%)\r\n",
      "  adding: submit/56.txt (deflated 40%)\r\n",
      "  adding: submit/336.txt (deflated 29%)\r\n",
      "  adding: submit/177.txt (deflated 14%)\r\n",
      "  adding: submit/416.txt (stored 0%)\r\n",
      "  adding: submit/335.txt (deflated 50%)\r\n",
      "  adding: submit/204.txt (deflated 41%)\r\n",
      "  adding: submit/139.txt (deflated 22%)\r\n",
      "  adding: submit/294.txt (stored 0%)\r\n",
      "  adding: submit/458(1).txt (stored 0%)\r\n",
      "  adding: submit/52.txt (stored 0%)\r\n",
      "  adding: submit/306.txt (stored 0%)\r\n",
      "  adding: submit/371.txt (deflated 13%)\r\n",
      "  adding: submit/431.txt (deflated 40%)\r\n",
      "  adding: submit/331.txt (deflated 42%)\r\n",
      "  adding: submit/457.txt (stored 0%)\r\n",
      "  adding: submit/460.txt (deflated 40%)\r\n",
      "  adding: submit/147.txt (deflated 15%)\r\n",
      "  adding: submit/445.txt (deflated 26%)\r\n",
      "  adding: submit/458.txt (deflated 22%)\r\n",
      "  adding: submit/345.txt (stored 0%)\r\n",
      "  adding: submit/151.txt (deflated 16%)\r\n",
      "  adding: submit/308.txt (deflated 4%)\r\n",
      "  adding: submit/199.txt (stored 0%)\r\n",
      "  adding: submit/99.txt (deflated 12%)\r\n",
      "  adding: submit/66.txt (deflated 48%)\r\n",
      "  adding: submit/26.txt (deflated 15%)\r\n",
      "  adding: submit/33.txt (stored 0%)\r\n",
      "  adding: submit/317.txt (deflated 17%)\r\n",
      "  adding: submit/96.txt (stored 0%)\r\n",
      "  adding: submit/399.txt (deflated 8%)\r\n",
      "  adding: submit/273.txt (stored 0%)\r\n",
      "  adding: submit/72.txt (stored 0%)\r\n",
      "  adding: submit/392.txt (deflated 28%)\r\n",
      "  adding: submit/205.txt (stored 0%)\r\n",
      "  adding: submit/307.txt (stored 0%)\r\n",
      "  adding: submit/303.txt (stored 0%)\r\n",
      "  adding: submit/393.txt (stored 0%)\r\n",
      "  adding: submit/268.txt (stored 0%)\r\n",
      "  adding: submit/286.txt (stored 0%)\r\n",
      "  adding: submit/251.txt (deflated 36%)\r\n",
      "  adding: submit/58.txt (deflated 34%)\r\n",
      "  adding: submit/267.txt (stored 0%)\r\n",
      "  adding: submit/439.txt (deflated 40%)\r\n",
      "  adding: submit/450.txt (deflated 40%)\r\n",
      "  adding: submit/92.txt (deflated 9%)\r\n",
      "  adding: submit/466.txt (stored 0%)\r\n",
      "  adding: submit/412.txt (deflated 16%)\r\n",
      "  adding: submit/291.txt (stored 0%)\r\n",
      "  adding: submit/400.txt (deflated 35%)\r\n",
      "  adding: submit/405.txt (deflated 13%)\r\n",
      "  adding: submit/304.txt (deflated 4%)\r\n",
      "  adding: submit/474.txt (stored 0%)\r\n",
      "  adding: submit/242.txt (stored 0%)\r\n",
      "  adding: submit/462.txt (stored 0%)\r\n",
      "  adding: submit/367.txt (deflated 27%)\r\n",
      "  adding: submit/381.txt (stored 0%)\r\n",
      "  adding: submit/70.txt (deflated 48%)\r\n",
      "  adding: submit/357.txt (stored 0%)\r\n",
      "  adding: submit/248.txt (stored 0%)\r\n",
      "  adding: submit/397.txt (deflated 14%)\r\n",
      "  adding: submit/71.txt (deflated 16%)\r\n",
      "  adding: submit/49.txt (stored 0%)\r\n",
      "  adding: submit/383.txt (deflated 46%)\r\n",
      "  adding: submit/461.txt (stored 0%)\r\n",
      "  adding: submit/257.txt (deflated 4%)\r\n",
      "  adding: submit/295.txt (stored 0%)\r\n",
      "  adding: submit/221.txt (stored 0%)\r\n",
      "  adding: submit/144.txt (stored 0%)\r\n",
      "  adding: submit/328.txt (deflated 37%)\r\n",
      "  adding: submit/344.txt (deflated 28%)\r\n",
      "  adding: submit/348.txt (deflated 21%)\r\n",
      "  adding: submit/293.txt (deflated 4%)\r\n",
      "  adding: submit/385.txt (deflated 35%)\r\n",
      "  adding: submit/471.txt (deflated 24%)\r\n",
      "  adding: submit/409.txt (stored 0%)\r\n",
      "  adding: submit/46.txt (deflated 24%)\r\n",
      "  adding: submit/353.txt (stored 0%)\r\n",
      "  adding: submit/366.txt (deflated 13%)\r\n",
      "  adding: submit/402.txt (deflated 47%)\r\n",
      "  adding: submit/237.txt (deflated 13%)\r\n",
      "  adding: submit/6.txt (deflated 22%)\r\n",
      "  adding: submit/220.txt (deflated 24%)\r\n",
      "  adding: submit/300.txt (stored 0%)\r\n",
      "  adding: submit/75.txt (deflated 41%)\r\n",
      "  adding: submit/449.txt (deflated 48%)\r\n",
      "  adding: submit/225.txt (deflated 46%)\r\n",
      "  adding: submit/358.txt (deflated 39%)\r\n",
      "  adding: submit/314.txt (deflated 21%)\r\n",
      "  adding: submit/234.txt (stored 0%)\r\n",
      "  adding: submit/25.txt (deflated 27%)\r\n",
      "  adding: submit/198.txt (deflated 46%)\r\n",
      "  adding: submit/148.txt (deflated 31%)\r\n",
      "  adding: submit/53.txt (deflated 52%)\r\n",
      "  adding: submit/347.txt (stored 0%)\r\n",
      "  adding: submit/475.txt (stored 0%)\r\n",
      "  adding: submit/301.txt (stored 0%)\r\n",
      "  adding: submit/236.txt (deflated 37%)\r\n",
      "  adding: submit/191.txt (deflated 24%)\r\n",
      "  adding: submit/447.txt (deflated 31%)\r\n",
      "  adding: submit/454.txt (deflated 24%)\r\n",
      "  adding: submit/277.txt (deflated 26%)\r\n",
      "  adding: submit/238.txt (deflated 16%)\r\n",
      "  adding: submit/456.txt (stored 0%)\r\n",
      "  adding: submit/323.txt (deflated 12%)\r\n",
      "  adding: submit/389.txt (deflated 20%)\r\n",
      "  adding: submit/352.txt (deflated 13%)\r\n",
      "  adding: submit/384.txt (deflated 15%)\r\n",
      "  adding: submit/370.txt (stored 0%)\r\n",
      "  adding: submit/453.txt (deflated 12%)\r\n",
      "  adding: submit/90.txt (deflated 13%)\r\n",
      "  adding: submit/219.txt (deflated 35%)\r\n",
      "  adding: submit/261.txt (deflated 48%)\r\n",
      "  adding: submit/170.txt (stored 0%)\r\n",
      "  adding: submit/468.txt (deflated 13%)\r\n",
      "  adding: submit/250.txt (stored 0%)\r\n",
      "  adding: submit/386.txt (stored 0%)\r\n",
      "  adding: submit/200.txt (deflated 31%)\r\n",
      "  adding: submit/464.txt (stored 0%)\r\n",
      "  adding: submit/459(1).txt (stored 0%)\r\n",
      "  adding: submit/447(1).txt (deflated 11%)\r\n",
      "  adding: submit/61.txt (deflated 23%)\r\n",
      "  adding: submit/432.txt (deflated 34%)\r\n"
     ]
    }
   ],
   "source": [
    "!\\rm submit.zip\n",
    "!\\rm -rf submit/.ipynb_checkpoints/\n",
    "!zip -r submit.zip submit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-08-25T10:13:03.709178Z",
     "iopub.status.busy": "2023-08-25T10:13:03.708102Z",
     "iopub.status.idle": "2023-08-25T10:13:03.945526Z",
     "shell.execute_reply": "2023-08-25T10:13:03.944600Z",
     "shell.execute_reply.started": "2023-08-25T10:13:03.709147Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "200\r\n"
     ]
    }
   ],
   "source": [
    "!ls submit | wc -l"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "py35-paddle1.2.0"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
